﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RVBike.Properties;

namespace RVBike
{
    class UserSetting : Singleton<UserSetting>
    {
        public string UserName 
        {
            get
            {
                return Settings.Default.UserName;
            }

            set
            {
                Settings.Default.UserName = value;
                Settings.Default.Save();
            }
        }

        public string CharName
        {
            get
            {
                return Settings.Default.CharName;
            }

            set
            {
                Settings.Default.CharName = value;
                Settings.Default.Save();
            }
        }

        public string Locale
        {
            get
            {
                return Settings.Default.Locale;
            }

            set
            {
                Settings.Default.Locale = value;
                Settings.Default.Save();
            }
        }

        // Password should not be kept!!
        public string Password {get; set;}

        public bool LoginNeeded
        {
            get
            {
                return Settings.Default.LoginNeeded;
            }

            set
            {
                Settings.Default.LoginNeeded = value;
                Settings.Default.Save();
            }
        }

        public UserSetting()
        {
            Password = "";
        }
    }
}